php foreach count rows

55

php foreach count rows -

<?php

$count = 0;

foreach( $names as $name){

$count = $count + 1;

echo  "<td>".$count. "</td>

      "<td>".$name. "</td>";
}

echo $count;

?>

Comments

Submit
0 Comments